package prehilife;

import java.util.Random;

public class FactoryPrehiCreature extends AbstractCreaturesFactory {

    public PrehiWorld world;
    private Random pos = new Random();

    public FactoryPrehiCreature(PrehiWorld world) {
        this.world = world;
    }

    @Override
    public Creature createCreatures() {
        return null;
    }

    public Cave createCave() {
        Cave cave = new Cave(world);
        cave.setPosition(pos.nextInt(world.getSizeX()), pos.nextInt(world.getSizeY()));
        return cave;
    }

    public Hut createHut() {
        Hut hut = new Hut(world);
        hut.setPosition(pos.nextInt(world.getSizeX()), pos.nextInt(world.getSizeY()));
        return hut;
    }

    public Grass createGrass(int posX, int posY) {
        Grass grass = new Grass();
        grass.setPosition(posX, posY);
        return grass;
    }

    public Mammouth createMammouth() {
        Mammouth mammouth = new Mammouth(world);
        mammouth.setPosition(pos.nextInt(world.getSizeX()), pos.nextInt(world.getSizeY()));
        return mammouth;
    }

    public Member createMember() {
        Member member = new Member(world, false, world.maxHP);
        member.setPosition(pos.nextInt(world.getSizeX()), pos.nextInt(world.getSizeY()));
        return member;
    }

    public Member createMember(int posX, int posY) {
        Member member=new Member(world, false, world.maxHP);
        member.setPosition(posX, posY);
        return member;
    }
}